﻿
using NetCourse.Framework.Database;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Xmu.Stores.Models
{
    // 考场分配类
    public class ExamRoomAllocation : EntityBase
    {
        public Guid AllocationId { get; set; } = Guid.NewGuid();

        public Guid ExamId { get; set; } = Guid.NewGuid();
        public Exam Exam { get; set; }

        public Guid ExamRoomId { get; set; } = Guid.NewGuid();
        public ExamRoom ExamRoom { get; set; }

        [ForeignKey("RegistrationID")]
        public Guid Registration1ID { get; set; }
        public Registration Registration1 { get; set; }

        [ForeignKey("RegistrationID")]
        public Guid Registration2ID { get; set; }
        public Registration Registration2 { get; set; }

        [Required]
        public AllocationStatus AllocationStatus { get; set; }

        public string? AllocationRules { get; set; }
    }

}
